<?

if($_POST["selbox"] != ''){

	if($check_me_authed == "OK"){

		$today_date 			= date("d-m-Y");

		$srcDbHdr			  = "MST_MODEL";
    $srcDbHdrLog     = "LOG_MST_MODEL";
    $srcDbDtl        = "MST_MODEL_COMPOS";

    $UID     = unserialize($_SESSION["serUID"]);
    $userId  = $UID->getUID();

		$Db = new oracleDb;
    $Db->init($_SESSION["ORCL"],
               $_SESSION["OPASS"],
               $_SESSION["SID"],
               _NO_COMMENT);

    if ($Db->connect()) {


			if(sizeof($_POST["selbox"]) == 0){

				$Misc->usrDieJs("Error nothing to be delete");
			}else{

				foreach($_POST["selbox"] as $delThisJobId){

          /**
          * Delete the previous entry
          *
          */
          $CLHandlers->dbEntDelete($Db,
                                   $delThisJobId,
                                   $srcDbHdr);
			  }

  			$Db->commit();

  			if($Db->getStatus() == true){

      	  $Misc->usrMsg("Delete Complete");
      	}else{

      	  $Misc->usrMsg("Delete Process Interupted");
      	}

      	$Db->dc();

  			//jumpTo(2,"../".$_SESSION["source_caller"]);
      }
		}else{

			$Misc->usrDieJs(_DB_CONN_ERROR);
		}
	}else{

		$Misc->usrDieJs("Error: Connection to oracle Failed");
	}
}else{

  $Misc->usrDieJs("Error: No Selection");
}
?>